Finally fixed the problem with assignment in the right hand side of an "and" making the variable nilable afterwards and, when in an "if"'s condition, not being nil.