Added protection against negative and NaN values on input