Corrected parameter type comparison logic