Checking for empty instead of null