prevent errors when params are empty

prevent errors with malformed params