Updated angular extend to ignore undefined properties