Added check for data types.