added extension function IsEmpty()