Four ways from If:
If[IntegerQ@#, # (# - 1), #] & /@ {3, \[Pi]}
(* {6, \[Pi]} *)
If[# \[Element] Integers, # (# - 1), #] & /@ {3, \[Pi]}
(* {6, \[Pi]} *)
If[Head@# === Integer, # (# - 1), #] & /@ {3, \[Pi]}
(* {6, \[Pi]} *)
If[MatchQ[#, _Integer], # (# - 1), #] & /@ {3, \[Pi]}
(* {6, \[Pi]} *)
The last two work also with user-defined heads. The 2nd argument to MatchQ can be any pattern.
If you like, you can return the pure function unevaluated on arguments that don't match the pattern:
If[MatchQ[#, _Integer], # (# - 1), Hold[#0][#]] & /@ {3, \[Pi]}
(* {6, Hold[If[MatchQ[#1, _Integer], #1 (#1 - 1),
Hold[#0][#1]] &][\[Pi]]} *)
although I don't see a use for it.
I'm not advocating using If, just pointing out what is possible.