check data before encrypt them