Added error checking for user input (NANs, 0's, Infinities).