Added null session checker.