Handling a case where we're passed a null object, fixes #5