Angular Check If Variable Is Object