Generally speaking, no project which allows pull requests (PR) should take umbrage if you submit a PR without talking to them first. However you need to know that not all developers handle PR in the same way. Some will merge it very quickly with a "Thanks!", some others will let it sit aside for a while before deciding to do anything, and some others will tell you "Good ideas, but let me write that differently." before committing their own patches and then closing your PR as obsolete.
With this in mind, it is never a bad idea to write some code and submit a PR if you are in one of the two following cases:
You need this code badly and are ready to use your own version of the software / module, instead of the official one. (After all, this is the spirit of free software: make the changes you need.)
Writing the code will take you less time than discussing the changes you want to introduce.
In all other cases, I would recommend to follow @PhilippeOmbredanne's advice as you could feel hurt if you spend time contributing a PR and it gets ignored or never merged.