Avoid NPE if user enters bad name for elements.