dtype type checking and docstrings