The Morse lemma for Banach spaces