Sure it is discrimination. Depending on the type of job, it may be a perfectly valid reason.