Integer Validation

used http://stackoverflow.com/a/1235891