code: function hasProperty(obj, propName) {
          return obj != null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && propName in obj;
      }
docs: Null safe way of checking whether or not an object,
  including its prototype, has a given property