I am wondering what the exclamation mark in if(!anObject) means.
if(!anObject)
It is the boolean NOT operator also called negation.
!true == false; !false == true;