Check for nil with guard clause