prevent errors when params are empty