Javascript Loop Through Array Of Objects And Check If Value Is String