Checks for datatype.

Based on feedback from @zabulus (https://github.com/cincuranet/NETProvider/pull/8).