Moved array checking logic in Yaml Mapper Factory to check if the an argument is an array first.