Display the correct error message when calling a binary moment without appropriate parameters.
Merge pull request #5399 from tr11/fix_flex_binary_moment_type_check

Display the correct error message when calling a binary moment without appropriate parameters.