added NaN test for check_square
added doc in code for check_square
Merge pull request #934 from stan-dev/feature/issue-891-check-square-nan

Feature/issue 891 check square nan