Well, I found that sometimes user_mfa_session sometimes returns nil thats why I added the ternary in order to keep it safe and works like a charm