Made Rails presence check more defensive