Adds a method to cast payload of Opt