Wouldn't be better to check against a interface?