Fixed foreach on null value