added NaN test for check_consistent_size

#### Summary:
Added NaN test and doc in code for check_consistent_size.

#### Intended Effect:
Added NaN test and doc in code for check_consistent_size.

#### How to Verify:
Run test/unit/math/error_handling/check_consistent_size

#### Side Effects:
None.

#### Documentation:
Added doc in the code.

#### Reviewer Suggestions:
Anyone.