Made $.when work with mixed type values without specifiying <any>