How To Check If A Variable Is An Object In Javascript