check for undefined length property to decide if it is an array like or not
check that the element exists before trying to remove the listener
added a when method to Model