17228 handle fractional hours

https://community.openproject.org/work_packages/17228
Just for the sake of the argument: You wouldn't need the distinction here between nil and not nil when you would cast hours.to_f. 

Is always valid then.