Added test for isDefined and isEmpty