Fix #158 - added new isEmpty function