Maybe<String> (@Nullable PyExpression ref) { if (ref instanceof PyNoneLiteralExpression) { return new Maybe<>(PyNames.NONE); } else if (ref != null) { final String name = ref.getName(); return name != null ? new Maybe<>(name) : unknown; } return none; }