Check if sendersession is actually defined before comparing it.