I have a Visualforce page to collect the Name and Email of clients. My Visualforce page looks like this:

```
<apex:page Controller="WebsiteController" >
<apex:sectionHeader title="Registration" subtitle="Please fill in the details"/>
    <apex:form >
        <apex:pageMessages />
        <apex:pageBlock title="Email updates">
        <apex:pageBlockButtons >
            <apex:commandButton action="{!submit}" value="Submit"/>
            <apex:commandButton action="{!reset}" value="Reset"/>
        </apex:pageBlockButtons>
        <apex:pageBlockSection >

//here is my problem: the page shows an input field for email, but not name
        <apex:inputField value="{!contact.Name}" required="true"/>
        <apex:inputField value="{!contact.Email}" required="true"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
</apex:form>
</apex:page>

```

I have no idea why one input field is shown and the other is not - I am probably missing a small detail.
['https://salesforce.stackexchange.com/questions/40620', 'https://salesforce.stackexchange.com', 'https://salesforce.stackexchange.com/users/8737/']
`LargestRevision.size()` will never return `null`.

The `size()` method will return `0` if the list is empty.

From the [documentation](https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_list.htm):

> 
> **size()**  
> 
>  Returns the number of elements in the list. 
> 
> 
> **Signature**  
> 
> `public Integer size()`
> 
> 
> **Return Value**  
> 
>  Type: Integer 
> 
> 
> **Example** 
> 
> 
> 
> ```
> List<Integer> myList = new List<Integer>();
> Integer size = myList.size();
> system.assertEquals(size, 0);
> 
> List<Integer> myList2 = new Integer[6];
> Integer size2 = myList2.size();
> system.assertEquals(size2, 6);
> 
> ```
> 
> 

Changing to the following should resolve this:

```
if(LargestRevision.size() > 0) {
    clonedQuteLink.Revision_Number__c=LargestRevision.get(0).Revision_Number__c+1;
    clonedQuteLink.Quote_Link__c = quoteLink.Quote_Link__c;                
}

```
You should replace the first part of the if with

```
 if(LargestRevision!=null and LargestRevision.size()!=0){
      clonedQuteLink.Revision_Number__c=LargestRevision.get(0).Revision_Number__c+1;
      clonedQuteLink.Quote_Link__c = quoteLink.Quote_Link__c;                
  }

```

because if LargestRevision is null (no values found) then you cannot call .size() on a null