Refactor double or none