Avoiding NPE in FileField