check for moment.js before conversion

Signed-off-by: Suhayb El Wardany <me@suw.me>