MRG: allow more ways to specify data dtype

A small refactoring to allow this:

    hdr = nib.Nifti1Header()
    hdr.set_data_dtype(float)

and this:

    hdr.set_data_dtype('f8')

Previously these would both raise an error.
This `if` block can be indented one stop, since you only need to re-check if you re-cast it above.