Move dtype check

With this, one line gets obsolete and can be removed.