Ensure value is an object before checking constructor property in console