Gracefully handles cases where destination could be nil

This is an improvement to the code in #92 and addresses the issue raised in #86 

Please review @jduff @emilienoel 

/cc @peternmr