Added null check to server.getImage() to prevent