Adding else case for invalid params