Handle use cases when reference is just None. Add test for this case.