front: Fix possible null pointer exception.