Merge pull request #26 from maksimov/2014.03

Added null check for keypairs