Converts an if expression checking variable being null or not of a type right after initializing it to an elvis operator in the initializer (if applicable)