Javascript Check If Object Not Arraylist Constructor