Allow nil to be specified as input to diff.

This PR allows the user to use nil as an input to settings. It makes the function easier to use for new users and for quick derivative testing.