Renamed checkParam function to reflect better what it does.