Can I do something like this?
if(variable = class.GetVariable() != null){
variable.doSomething()
}
As I said in the comments I'm doing this with a HttpSession, so my goal is to check if there is a parameter in the session with a specific name and if it is do something.