Refactor whenPresent to use promises.
Refactor whenPresent to use promises.

ajnsit/dreamwriter,rtfeldman/dreamwriter,rtfeldman/dreamwriter,zztczcx/dreamwriter,zztczcx/dreamwriter,Iced-Tea/dreamwriter,manesiotise/dreamwriter,Softsapiens/dreamwriter,jlongster/dreamwriter,ajnsit/dreamwriter,makyo/dreamwriter,Softsapiens/dreamwriter,jlongster/dreamwriter,manesiotise/dreamwriter,Iced-Tea/dreamwriter,makyo/dreamwriter