Add a type constraint on Session methods so that users don't pass Nothing, close #1599