Shorter code for object hasElems

**Check this out!**