Added null checks for mobile issue