Refactor exception existance validation to make HHVM happy

the message is weird. One of the case is that the class might be loaded without being an exception too.