null check before use the retrieved data