Ensure that session save input is the correct type
Merge branch 'session-cleanup'

* session-cleanup:
  Ensure that session save input is the correct type