When Not to Trust Language Models: Investigating Effectiveness and Limitations of Parametric and Non-Parametric Memories