Check If Object Has Attribute Javascript Function How To Use