ENH: Better error message on object dtype. Closes #880