updated media tag check to handle upper and lower case