Doubt from Thermodynamics

G=G°+RTlnK
For K can we use Kc for a non gaseous reaction? Or is this equation valid for gaseous reaction only where we use Kp?

K is for Kcp i.e conc for liq and pressure for gas

Thank you