Fixed currentState not-null checks.