better check valid input data