Protect against lack of input params

Signed-off-by: Nick Lambourne <nick.lambourne@gmail.com>