Possibly fixed bug for checking types in dot product