Capgemini Interview Question

handling null pointer in kotlin