Reduced use of nulls to avoid NullPointerExceptions