On a class of nonlocal problems with applications to mathematical biology