refactor(options) move checking nil into toParameters function