as.OptPos function

Coerce an argument to OptPos class.