change logic to check null/empty content-type