Fixed some data input validation

Signed-off-by: pgnunes <pgh.nunes@gmail.com>