Javascript Check If Variable Is An Object That Is More Dense