Improve check type of data