Add exception handling in menu link helper