Improve data check