Improve isEmpty implementation.

- Allow use of isEmpty property as well as
  method when checking for implicit definitions.