Fixed parse_duration() so that it can return None