Renamed isNil function to isEmpty.