Added Result.Type enum to avoid comparing strings