Tweak data select statement to check for the expected data type