[BZ-1099767] return a null in legacy api when trying to get a non-existing entry point
(cherry picked from commit a2755f722c8100c8539e2402c88d4244bcb492ba)