Prefer isEmpty() for collections rather than size()