Preventing NullPointerExceptions in Matchers