Added data type conversion to ensure proper comparison / validation

Post commit code review : Cyrus Venn Casada