{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/274","labels_url":"https://api.github.com/repos/facebook/flow/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/274/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/274/events","html_url":"https://github.com/facebook/flow/issues/274","id":58656052,"number":274,"title":"calling optional function that has React.PropTypes.func with null check","user":{"login":"bakesteve","id":605712,"avatar_url":"https://avatars.githubusercontent.com/u/605712?v=3","gravatar_id":"","url":"https://api.github.com/users/bakesteve","html_url":"https://github.com/bakesteve","followers_url":"https://api.github.com/users/bakesteve/followers","following_url":"https://api.github.com/users/bakesteve/following{/other_user}","gists_url":"https://api.github.com/users/bakesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/bakesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakesteve/subscriptions","organizations_url":"https://api.github.com/users/bakesteve/orgs","repos_url":"https://api.github.com/users/bakesteve/repos","events_url":"https://api.github.com/users/bakesteve/events{/privacy}","received_events_url":"https://api.github.com/users/bakesteve/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/facebook/flow/labels/react","name":"react","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-23T21:59:31Z","updated_at":"2015-06-24T00:26:32Z","closed_at":"2015-06-24T00:26:32Z","body":"Same as [this SO question](http://stackoverflow.com/questions/27560997/optional-function-prop-in-react-component-flow-type-check-fail) I have a prop, with PropTypes.func, but am getting \r\n```\r\ncall of method exampleFn\r\nFunction cannot be called on possibly null or undefined value\r\n```\r\ndespite various methods of null checking, but it only passes if I use the answer given on SO:\r\n```\r\nvar exampleFn = this.props.exampleFn || null;\r\n  if (exampleFn) {\r\n    exampleFn();\r\n  }\r\n```\r\n\r\n"}}