Convert return type to enum