remove redundant isEmpty checks