Fixed issue when passed value is undefined