Small improvments

Added a .gitignore file to exclude files from the repo.
Changed the checks for NULL.