On absence of threshold resonances for Schrödinger and Dirac operators