avoid creating the moment() object if unnecessary

Signed-off-by: Tomas Neme <lacrymology@gmail.com>