Handle nil values in credentials comparison

- Fixes #219