Changed typeof string check