Amended check for a variable type
Corrected example