added npe checks, verify ev in test