Fix type check for datum