What is the best way to check if a property in JavaScript is not an object?

Try using the hasOwnProperty() negation.

This checks only the object’s own properties, not anything inherited via the prototype chain. It’s safer in some cases, especially if you’re avoiding inherited keys.

if (!tutorTimes.hasOwnProperty(id)) {
  // Property does NOT exist
}