Using user_access() on Custom Node Type How can I check if a user has access to create a new node of a custom node type?

In 'admin/people/permissions' I have an item named "Custom Type: Create new content" and it is enabled for authenticated users.

How can I use user_access() to verify against "Custom Type: Create new content"?
Perhaps I'm missing something, but noting that using exactly the text 'Custom Type: Create new content' does not work with user_access, at least not for me. 

Instead, use the machine value of the permission. One way to get that is to look at the user permission page, and view the checkbox value for the permission. 

For example, instead of this:

if (user_access('Basic page: Edit any content'))


use this

if (user_access('edit any page content'))


To find the definition of the machine name, look in the .module file of the module that defines the permission.