The best way for you to determine if your apratment is illegal from  permit standard is to call your local building and permit department for an inspection of it as to code issues. Depending upon what is discovered, you should know one way or another as to the legality of your apartment.As to whether your landlord can rent the unit from a zoning perspective, I suggest that you go down to your township's zoning department and have the zoning department's representative run a check on the unit you are living in to see if your landlord is allowed to rent it out.