I've found that I can use in:
if ("propertyName" in obj) { }
Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#in