adds handling for empty / nil params