Catch undefined value before clone