To check if a number has decimal points you can do the following:

if (floor(value) != value){
// it has decimal points
}