BUG: raise ValueError for nanarg(min|max) for all nan along axis

The assignment of nan to the non-floating result of these function
always caused a ValueError. This adds a more specific error and removes
relying on the assignment failing.