fix checkArrayIfType and merge pull request #66 from sars/master