Basic either based pattern matching.