added doc for nan behavior in code for error_handling