If you're solving this differential equation using separation of variables, you would start by writing:
dy/y = dx
Notice when you do this, you are dividing both sides of the equation by y. That means you are assuming that y is not 0 (because division by 0 is not defined). Therefore, the logic of your derivation is not valid when y=0, and you must test that as a separate case. In general, whenever a derivation involves dividing both sides of an equality by a quantity that may be zero, you must test what happens when the quantity is zero as a separate case.