Fixes #60 by using !isNull() instead of isDefined()